﻿//
// Created: 2018/11/28
// Author: chenqiang
//
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using Model.Util;

namespace Model.Util.Map
{
    internal  class IndexCategoryMap:EntityTypeConfiguration< IndexCategory >    
    {
        public IndexCategoryMap()
        {
             this.ToTable("IndexCategory");
             this.HasKey(i => new { i.IndexCateId });
             this.Property(i => i.IndexCateId).HasColumnName("IndexCateId");                     
             this.Property(i => i.CategoryID).HasColumnName("CategoryID");                     
             this.Property(i => i.IndexCateShowName).HasColumnName("IndexCateShowName");                     
             this.Property(i => i.IndexCateUrl).HasColumnName("IndexCateUrl");                     
             this.Property(i => i.Remarks).HasColumnName("Remarks");                     
             this.Property(i => i.CreateTime).HasColumnName("CreateTime");
            this.Property(i => i.EndTime).HasColumnName("EndTime");
            this.Property(i => i.IconImg).HasColumnName("IconImg");                     
             this.Property(i => i.Domain).HasColumnName("Domain");                     
             this.Property(i => i.Sort).HasColumnName("Sort");                     
             this.Property(i => i.Enable).HasColumnName("Enable");                     
        }   
    }
    
     public static class IndexCategoryMapExtensions
    {
        public static void UserIndexCategoryMap(this DbModelBuilder pModelBuilder)
        {
            pModelBuilder.Configurations.Add(new IndexCategoryMap());
        }
    }
}